package com.yonyou.train.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;

public class Class_Sub {
    private long id;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date starttime;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date endtime;
    private String address;
    private int dr;
    private long class_id;



    public long getId() {
        return id;
    }

    public Date getStarttime() {
        return starttime;
    }

    public Date getEndtime() {
        return endtime;
    }

    public String getAddress() {
        return address;
    }

    public int getDr() {
        return dr;
    }

    public long getClass_id() {
        return class_id;
    }





    public void setId(long id) {
        this.id = id;
    }

    public void setStarttime(Date starttime) {
        this.starttime = starttime;
    }

    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setDr(int dr) {
        this.dr = dr;
    }

    public void setClass_id(long class_id) {
        this.class_id = class_id;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Class_Sub class_sub = (Class_Sub) o;
        return Objects.equals(starttime, class_sub.starttime) &&
                Objects.equals(endtime, class_sub.endtime) &&
                Objects.equals(address, class_sub.address);
    }

    @Override
    public int hashCode() {

        return Objects.hash(starttime, address, class_id);
    }

    @Override
    public String toString() {
        return "Class_Sub{" +
                "id=" + id +
                ", starttime=" + starttime +
                ", endtime=" + endtime +
                ", address='" + address + '\'' +
                ", dr=" + dr +
                ", class_id=" + class_id +
                '}';
    }
}
